home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 108
/
jogo-disk-108.iso
/
Games
/
simple_tower_defense.swf
/
scripts
/
frame_3
/
PlaceObject2_259_241
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2010-05-15
|
2KB
|
73 lines
onClipEvent(enterFrame){
if(_root.go == true)
{
removeMovieClip(this);
}
if(_X > 450 || _X < 0 || _Y < 0 || _Y > 400)
{
this.removeMovieClip();
}
ys = spd * Math.cos(0.017453292519943295 * _rotation);
xs = spd * Math.sin(0.017453292519943295 * _rotation);
if(_rotation > 180)
{
_Y = _Y + ys;
_X = _X - xs;
}
else
{
_Y = _Y - ys;
_X = _X + xs;
}
if(_root.en50.hitTest(this))
{
_root.en50.el -= dmg;
removeMovieClip(this);
}
else if(_root.en51.hitTest(this))
{
_root.en51.el -= dmg;
removeMovieClip(this);
}
else if(_root.en52.hitTest(this))
{
_root.en52.el -= dmg;
removeMovieClip(this);
}
else if(_root.en53.hitTest(this))
{
_root.en53.el -= dmg;
removeMovieClip(this);
}
else if(_root.en54.hitTest(this))
{
_root.en54.el -= dmg;
removeMovieClip(this);
}
else if(_root.en55.hitTest(this))
{
_root.en55.el -= dmg;
removeMovieClip(this);
}
else if(_root.en56.hitTest(this))
{
_root.en56.el -= dmg;
removeMovieClip(this);
}
else if(_root.en57.hitTest(this))
{
_root.en57.el -= dmg;
removeMovieClip(this);
}
else if(_root.en58.hitTest(this))
{
_root.en58.el -= dmg;
removeMovieClip(this);
}
else if(_root.en59.hitTest(this))
{
_root.en59.el -= dmg;
removeMovieClip(this);
}
}